<include file="Index/header" />
<body>
<div id="wrapper">

	<include file="Index/nav"/>
	<div id="page-wrapper">

		<div class="container-fluid">

			<!-- Page Heading -->
			<div class="row">
				<div class="col-lg-12">
					<a href="/admin.php?c=basic&a=cache"><button type="button" class="btn btn-primary"> 缓存配置</button></a>
				</div>
			</div>
			<!-- /.row -->
			<div class="row">
				<div class="col-lg-6">
					<div class="form-group">
						<label for="inputname" class="col-sm-2 control-label">更新首页缓存:</label>
						<div class="col-sm-5">
							<button type="button" class="btn" id="cache-index">确定更新</button>
						</div>
					</div>



				</div>

			</div>
			<!-- /.row -->

		</div>
		<!-- /.container-fluid -->

	</div>
	<!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->
<script>
    $("#cache-index").click(function(){

        var url = 'index.php?c=index&a=build_html';
        var jump_url = '/admin.php?c=basic&a=cache';
        var postData = {};

        $.post(url, postData,function(result){
            if(result.status==1) {
                // 成功
                return dialog.success(result.message,jump_url);
            }else if(result.status==0) {
                return dialog.error(result.message);
            }

        },"JSON");
    });

</script>
<include file="Index/footer" />